Retrieving Library Functions by Unifying Types Modulo Linear Isomorphism

نویسنده

  • Mikael Rittri
چکیده

An improved method to retrieve a library function via its Hindley/Milner type is described. Previous retrieval systems have identiied types that are isomorphic in any Cartesian closed category (CCC), and have retrieved library functions of types that are either isomorphic to the query, or have instances that are. Sometimes it is useful to instantiate the query too, which requires uniication modulo isomorphism. Although uniiability modulo CCC-isomorphism is undecidable, it is decidable modulo linear isomorphism, that is, isomorphism in any symmetric monoidal closed (SMC) category. We argue that the linear isomorphism should retrieve library functions almost as well as CCC-isomorphism, and we report experiments with such retrieval from the Lazy ML library. When uniication is used, the system retrieves too many functions, but sorting by the sizes of the uniiers tends to place the most relevant functions rst. R esum e Ce papier pr esente une nouvelle m ethode pour la recherche d'une fonc-tion dans une librairie de programmes a partir de son type (au sens de Hindley/Milner). Les m ethodes utilis ees jusqu'ici identiient les types qui sont isomorphiques dans n'importe quelle cat egorie cart esienne ferm ee (CCF), et le type r esultat est soit isomorphe au type demand e, soit en est une g en eralisation. Il est quelquefois utile d'instancier le type demand e, ce qui n ecessite de r esoudre un probl eme d'uniication modulo isomorphismes. Bien que l'uniication modulo CCF-isomorphismes soit ind ecidable, ce probl eme est d ecidable modulo isomorphismes lin eaires, c'est-a-dire isomorphismes dans une cat egorie monoidale ferm ee sym etrique. Notre th ese est que la recherche d'une fonction modulo isomorphismes lin eaires doit ^ etre aussi utile que modulo CCF-isomorphismes. Nous pr esentons quelques r esultats exp erimentaux, qui ont et e eeectu es dans la librairie de fonctions de Lazy ML. En pr esence d'uniication, le syst eme trouve trop de fonctions, mais ce probl eme peut ^ etre r esolu en classant les substitutions par leur taille.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the Unification Problem for Cartesian Closed Categories

Cartesian closed categories (CCC’s) have played and continue to play an important role in the study of the semantics of programming languages. An axiomatization of the isomorphisms which hold in all Cartesian closed categories discovered independently by Soloviev and Bruce and Longo leads to seven equalities. We show that the unification problem for this theory is undecidable, thus settling an ...

متن کامل

On Isomorphism of "Functional" Intersection and Union Types

Type isomorphism is useful for retrieving library components, since a function in a library can have a type different from, but isomorphic to, the one expected by the user. Moreover type isomorphism gives for free the coercion required to include the function in the user program with the right type. The present paper faces the problem of type isomorphism in a system with intersection and union ...

متن کامل

Toward Isomorphism of Intersection and Union types

This paper investigates type isomorphism in a λ-calculus with intersection and union types. It is known that in λ-calculus, the isomorphism between two types is realised by a pair of terms inverse one each other. Notably, invertible terms are linear terms of a particular shape, called finite hereditary permutators. Typing properties of finite hereditary permutators are then studied in a relevan...

متن کامل

On the Uniication Problem for Cartesian Closed Categories

Cartesian closed categories (CCC's) have played and continue to play an important role in the study of the semantics of programming languages. An axiomatiza-tion of the isomorphisms which hold in all Cartesian closed categories discovered independently by Soloviev and Bruce and Longo leads to seven equalities. We show that the uniication problem for this theory is undecidable, thus settling an ...

متن کامل

argo-lib: A Generic Platform for Decision Procedures

argo-lib is a C++ library that provides support for using decision procedures and for schemes for combining and augmenting decision procedures. This platform follows the smt-lib initiative which aims at establishing a library of benchmarks for satisfiability modulo theories. The platform can be easily integrated into other systems. It also enables comparison and unifying of different approaches...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • ITA

دوره 27  شماره 

صفحات  -

تاریخ انتشار 1993